CFILE = clientinfo.dsc.c\
	memberlist.dsc.c\
	message.dsc.c

HFILE = \
	clientinfo.dsc.h \
	memberlist.dsc.h \
	message.dsc.h

CC = gcc -g
.SUFFIXES:.c
.c.o    :
	$(CC) $(CFLAGS) -c $< $(IFLAGS) -fno-builtin-exit

c_FILE_o = $(CFILE:.c=.o)

IFLAGS = -I. -I$(HOME)/include/fasterjson/
LFLAGS = -L. -L$(HOME)/lib/ -lfasterjson


all: $(c_FILE_o)
	ar cr libminitalkproto.a $(c_FILE_o)
clean:
	rm -rf *.o *.a
install: all
	if [ ! -x "$(HOME)/include/minitalkproto" ]; then \
		mkdir "$(HOME)/include/minitalkproto"; \
	fi
	for FILE in `echo $(HFILE)` ; do \
		cp $$FILE $(HOME)/include/minitalkproto; \
	done

	if [ ! -x "$(HOME)/lib/minitalkproto" ]; then \
                mkdir "$(HOME)/lib/minitalkproto"; \
        fi
	
	cp libminitalkproto.a $(HOME)/lib/minitalkproto 
	
uninstall:
	rm -rf $(HOME)/include/minitalkproto; \
	rm -rf $(HOME)/lib/minitalkproto
	

